package com.example.controller;

import com.example.entity.City;
import com.example.service.SearchCityInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Scope("prototype")
@RestController
@RequestMapping("/learn")
public class SelectCityInfo {

    @Autowired
    private SearchCityInfo searchCityInfo;
    @PostMapping("/searchCityInfo")
    List<City> searchCityInfo() {
        List<City> cities = searchCityInfo.searchCityInfo();
        return cities;
    }

}
